<template>
  <span>开发者列表</span>
  <el-table :data="tableData" style="width: 100%">
    <el-table-column prop="userNm" label="登录账号" width="180" />
    <el-table-column prop="nickNm" label="昵称" width="180" />
    <el-table-column prop="sex" label="性别" width="180" />
    <el-table-column prop="birth" label="生日" />
    <el-table-column prop="delivery" label="是否应届" />
    <el-table-column prop="major" label="所学专业" />
  </el-table>
  <el-button type="primary" @click="onSubmit">搜索</el-button>
</template>

<script>
import axios from 'axios'
/* eslint-disable */
export default {
  name: 'GetUser',
  data(){
    return  {
      tableData:[]
    }
  },
  methods: {
    onSubmit() {
      axios.get('http://localhost:9083/getDevelopers', {
        headers: {
          'Content-Type': 'application/json;charset=UTF-8',//设置请求头请求格式为JSON
        },
      }).then(
        (res) => {
          console.log("用户数据", res.data);
          this.tableData = res.data;
        }
      )
    }
  }
}
</script>
